#!/bin/bash

if [ ! -d "/media/data" ];then
    sudo mkdir /media/data
    echo "create dir: /media/data"
fi

if [ ! -z "$(ls /media/data)" ];then
    echo "/media/data not null, can't mount dir"
    exit -1
fi

sudo mount /dev/sdb /media/data